import getpass

def printMenu():
    print("1 login")
    print("2 file")
    print("3 xxx")
    print("4 quit()")

def login():
    userName=input("请输入用户名：")
    passwod=getpass.getpass("请输入密码：")

    if (userName == "admin" and passwod == "admin") :
        print("登录成功！")
        return 0
    else:
        print("用户名或密码错误：")
        return -1

def main():
    ok = login()

    if ok >= 0:

        printMenu()
        line = input("请输入选项：\n")

        if (line == "quit"):
            quit(0)
        else:
            run()
    quit(0)

def run():
    print("run()")

main()
